#ifndef __USERFUNCTION_H__
#define __USERFUNCTION_H__

#include "../头文件/SelectObject.h"
#include "../头文件/showjpg.h"
#include "../头文件/AllFunction.h"
#include "../头文件/Allenum.h"
#include "../头文件/AllStruct.h"

#define ACCOUNTPASSWORD "../Image/AccountPassword.jpg"
#define LOGO_REGISTER "../Image/logo_register.jpg"
#define LOGO_LOGIN "../Image/logo_login.jpg"
#define OPEN_SMALL_EYE "../Image/open_small_eye.jpg"
#define CLOSE_SMALL_EYE "../Image/close_small_eye.jpg"
#define USER_DATA "../Data/User.txt"

#define LOGIN_SUCCESS "../Image/loginsuccess.jpg"
#define LOGIN_FAIL "../Image/loginfail.jpg"
#define REGISTER_SUCCESS "../Image/registersuccess.jpg"
#define REGISTER_FAIL "../Image/registerfail.jpg"
#define ALREADY_EXIST_ACCOUNT "../Image/oldaccount.jpg"

// 判断当前用户点击的是哪个填写框
Flag clickobject;
// 定义全局变量-小眼睛
bool smallEyeState;

// 从充电模块的文件获得是否打开修改密码界面的布尔值
extern bool isChangePassword;
// 输入的旧密码
extern char InputOldPassword[30];
// 输入的新密码
extern char InputNewPassword[30];

void goto_register();

void goto_login();

void select_register_or_login();

void return_key();

char keyboard_touch(Flag key);

void input_data();

void small_eye(bool eye);

char *hide_password(char *password);

bool StoreData(UserData *userdata);

UserData *GetUserData(const TextType Account);

#endif